<?php
/**
 * 作者归档模板
 *
 * 浏览作者存档时加载这个模板
 * @link http://codex.wordpress.org/Author_Templates
 *
 * @package one
 * @subpackage Template
 */

get_header(); ?>

	<div class="hfeed content">

		<?php one_before_content(); // content之前的钩子 ?>

		<?php $curauth = get_userdata( get_query_var( 'author' ) );  ?>

		<div id="hcard-<?php echo str_replace( ' ', '-', $curauth->display_name ); ?>" class="author-info author-profile vcard">

			<h1 class="author-title fn n"><?php echo $curauth->display_name; ?></h1>

			<div class="author-description">
				<?php echo get_avatar( $curauth->user_email, '100', $one_settings['default_avatar'] ); ?>

				<p class="author-bio">
					<?php echo $curauth->description; ?>
				</p>
			</div>

		</div>

		<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

			<div id="post-<?php the_ID(); ?>" class="<?php one_entry_class(); ?>">

				<?php get_the_image( array( 'custom_key' => array( 'Thumbnail' ), 'default_size' => 'thumbnail' ) ); ?>

				<?php one_before_entry(); // entry之前的钩子 ?>

				<div class="entry-summary entry">
					<?php the_excerpt(); ?>
				</div>

				<?php one_after_entry(); // entry之后的钩子 ?>

			</div>

			<?php endwhile; ?>

		<?php else: ?>

			<p class="no-data"><?php printf( __('%1$s 没有撰写任何日志.', 'one' ), $curauth->display_name ); ?></p>

		<?php endif; ?>

		<?php one_after_content(); // content之后的钩子 ?>

	</div>

<?php get_footer(); ?>